﻿using System.ComponentModel.DataAnnotations;
using FlyingHat.Model.Enums;

namespace FlyingHat.Core.Entities
{
    /// <summary>
    /// 借还书
    /// </summary>
    public class BorrowReturnBook : ModifyEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 书籍ID
        /// </summary>
        public long BookId { get; set; }

        /// <summary>
        /// 书名
        /// </summary>
        [Required, StringLength(50)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 书籍借阅状态
        /// </summary>
        public BorrowReturnStatus BorrowReturnStatus { get; set; }

        /// <summary>
        /// 借书时间
        /// </summary>
        public DateTime BorrowTime { get; set; }


        /// <summary>
        /// 还书时间
        /// </summary>
        public DateTime ReturnTime { get; set; }
    }
}
